<div class="crumbs">
  <h3>未加入会话</h3>
  <p><a ui-sref="main.chatOut" >会话管理</a> > 未加入会话</p>
</div>

<div class="chat-wrap clearfix">
    <div class="chat-contL float-left">
        <div class="chat-contL-normal float-left chat-active">
            <div class="chat-contL-group">正常聊天</div>
            <div class="chatOut-contL-IM">
                <ul class="chat-contL-list js-chat-normal">
                </ul>
            </div>
        </div>
        <div class="chat-contL-danger float-left">
            <div class="chat-contL-group">风险聊天</div>
            <div class="chatOut-contL-IM">
                <ul class="chat-contL-list js-chat-danger">
                </ul>
            </div>
        </div>
    </div>
    <div class="chat-contR float-right">
        <div class="chat-contR-top">
            <div class="chat-contR-top-info clearfix">
                <h4><!-- 钢之城作品团队001 --></h4>
                <p><span><!-- 客户已联系： --></span><span style="margin-left:30px;"><!-- 会话创建时间： --></span></p>
            </div>
        </div>
        <div class="chat-contR-mid">
            <div class="chat-contR-IM">
                <ul class="chat-contR-list clearfix">
                    <!-- <div class="chat-tips">请点击下方的历史消息盒子查看更多历史记录</div>
                    <a href="javascript:void(0);" class="chat-more" ng-click="chatMore()">查看更多消息</a> -->
                </ul>
            </div>
        </div> 
        <div class="chat-contR-bottom">
            <div class="chat-contR-operate">
                操作群组：<span class="chat-btn-normal" ng-click="normalClick()">正常</span><span class="chat-btn-danger" ng-click="dangerClick()">风险</span><span class="chat-btn-join" ng-click="joinClick()">加入该群</span>
            </div>
            <div class="chat-history">历史消息翻页：<span class="chat-history-homePage">首页</span><span class="chat-history-prvePage">上一页</span><input class="chat-history-input" type="text"> /<span class="chat-history-totalPage">1</span><span class="chat-history-nextPage">下一页</span><span class="chat-history-endPage">尾页</span></div>
        </div>
    </div>

</div>



<script>

    var data = {};
    // 注意这里, 引入的 SDK 文件不一样的话, 你可能需要使用 SDK.NIM.getInstance 来调用接口
    var nim = SDK.NIM.getInstance({
        //debug: true,
        appKey: 'e8b991bf2ad74183a572fb272411ae85',
        account: '350481882',
        token: 'token',
        onconnect: onConnect,
        onwillreconnect: onWillReconnect,
        ondisconnect: onDisconnect,
        onerror: onError
    });

    function onConnect() {
        console.log('连接成功');
    }
    function onWillReconnect(obj) {
        // 此时说明 SDK 已经断开连接, 请开发者在界面上提示用户连接已断开, 而且正在重新建立连接
        console.log('即将重连');
        console.log(obj.retryCount);
        console.log(obj.duration);
    }
    function onDisconnect(error) {
        // 此时说明 SDK 处于断开状态, 开发者此时应该根据错误码提示相应的错误信息, 并且跳转到登录页面
        console.log('丢失连接');
        console.log(error);
        if (error) {
            switch (error.code) {
                // 账号或者密码错误, 请跳转到登录页面并提示错误
                case 302:
                    break;
                // 重复登录, 已经在其它端登录了, 请跳转到登录页面并提示错误
                case 417:
                    break;
                // 被踢, 请提示错误后跳转到登录页面
                case 'kicked':
                    break;
                default:
                    break;
            }
        }
    }
    function onError(error) {
        console.log(error);
    }


</script>